package com.eclipseutilplugin.libplugin;

import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;

public class AbstractClasspathPage extends WizardPage implements IClasspathContainerPage {

	IClasspathEntry entry = null;

	String id = null;

	public AbstractClasspathPage(String nm, String id) {
		super(nm);
		this.id = id;
	}

	@Override
	public boolean finish() {

		entry = JavaCore.newContainerEntry(new Path(id));

		return true;
	}

	@Override
	public IClasspathEntry getSelection() {
		// TODO Auto-generated method stub
		return entry;
	}

	@Override
	public void setSelection(IClasspathEntry arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void createControl(Composite arg0) {
		// TODO Auto-generated method stub

		Composite comp = new Composite(arg0, SWT.NULL);
		comp.setLayout(new org.eclipse.swt.layout.GridLayout());
		setControl(comp);

	}

}
